<@realgodo.cloumn>
<div class="content bgff">
	<@realgodo.friend_nav/>
	<div class="zs_r l bgff" style=" width:auto">
		<div class="py_list vd_center">
			<hr/>
			<#if (friendConfigPage?exists) && (friendConfigPage.result?has_content)>
			<form name="friendConfigForm" id="friendConfigForm" action="${base}/user/friend/index!save" method="post">
			<table cellpadding="0" cellspacing="5" border="0" width="100%">
				<tr>
					<td width="80px"></td>
					<td width="53px"></td>
					<td>&nbsp;</td>
					<td>描述</td>
					<td width="100px" class="font12 vd_color9" valign="bottom">首页&nbsp;&nbsp;动态</td>
					<td align="left" class="font12 vd_color9">
						<div style="margin-left:110px">操作</div>
						<input type="hidden" value="${active!}" name="active"/>
						<input type="hidden" value="${(catalogId?c)!}" name="catalogId"/>
					</td>
				</tr>
				<#list friendConfigPage.result as config>
				<tr>
					<td width="80px" align="left"><img src="${base}/images/bg.jpg" />
						<span class="font13 vd_font vd_weight mainColor">
							<span class="fontar">VIP</span>
						</span>
					</td>
					<td width="53px">
						<img width="53px" height="56px" src="${(config.relater.user.head.fullPath)!'${base}/images/pp.jpg'}" />
					</td>
					<td  valign="bottom">
						<div class="bga l">
							<a href="${base}/user/?sid=${config.relater.id?c}" hidefocus class="mainColor font13">${(config.relater.name)!}</a>
							<span class="font13 vd_weight  vd_color9">V${(config.relater.level)!}</span>
						</div>
						<#--
						<div class="r">
							<span class="bga"><a href=" #" hidefocus class="font12 vd_color9" style="vertical-align:bottom">添加描述</a></span>
						</div>
						-->
					</td>
					<td valign="bottom">
						<input type="text" name="comments" value="${config.comment!'-1'}" />
					</td>
					<td width="100px" valign="bottom">
						<#if config.isTop==1>
						<input type="checkbox"  class="bgff" id="isTops_${config.id?c}" name="isTops_show" value="1" checked="checked" onchange="resetValue('isTops_${config.id?c}')"/>&nbsp;&nbsp;
						<input type="hidden"  id="isTops_${config.id?c}_value" name="isTops" value="1" />
						<#else>
						<input type="checkbox"  class="bgff" id="isTops_${config.id?c}" name="isTops_show" value="1" onchange="resetValue('isTops_${config.id?c}')"/>&nbsp;&nbsp;
						<input type="hidden"  id="isTops_${config.id?c}_value" name="isTops" value="0" />
						</#if>
						
						<#if config.isCare==1>
						<input type="checkbox"  class="bgff" id="isCares_${config.id?c}" name="isCares_show" value="1" checked="checked" onchange="resetValue('isCares_${config.id?c}')"/>&nbsp;&nbsp;
						<input type="hidden"  id="isCares_${config.id?c}_value" name="isCares" value="1" />
						<#else>
						<input type="checkbox"  class="bgff" id="isCares_${config.id?c}" name="isCares_show" value="1" onchange="resetValue('isTops_${config.id?c}')"/>&nbsp;&nbsp;
						<input type="hidden"  id="isCares_${config.id?c}_value" name="isCares" value="0" />
						</#if>
					</td>
					<td align="center">
						<#--<input type="button" value="转为新朋友" class="font12 vd_color9 bgff" style="padding:2px; margin-bottom:5px"/>&nbsp;&nbsp;-->
						<input type="button" value="删除朋友" class="font12 vd_color9 bgff" style="padding:2px;margin-bottom:5px" onclick="confirmDelete('${config.id?c}')"/>&nbsp;&nbsp;
						<span  class="font12 vd_color9">转移组</span>
						<select class="font12 vd_color9 bgff" name="catalogIds">
							<option value="1">未分组 </option>
							<#list friendCatalogList as fc>
							<#if config.catalog?exists&&config.catalog.id==fc.id>
							<option value="${fc.id?c}" selected=true>${fc.name!}</option>
							<#else>
							<option value="${fc.id?c}">${fc.name!} </option>
							</#if>
							</#list>
						</select>
						<input type="hidden" value="${config.id?c}" name="ids"/>
					</td>
				</tr>
				</#list>
			</table>
			<form>
			<hr />
			<#--
			<table cellpadding="0" cellspacing="5" border="0" width="100%"><tr><td width="80px" align="left"><img src="${base}/images//bg.jpg" /> <span class="font13 vd_font vd_weight mainColor"><span class="fontar">VIP</span></span></td><td width="53px"><img src="${base}/images//pp.jpg" /></td><td  valign="bottom" ><div class="bga l"><a href="#" hidefocus class="mainColor font13">马跃..</a> <span class="font13 vd_weight  vd_color9">V2</span></div><div class="r"><span class="bga"><a href=" #" hidefocus class="font12 vd_color9" style="vertical-align:bottom">添加描述</a></span></div></td><td width="100px"><input type="checkbox"  class="bgff"/>&nbsp;&nbsp;<input type="checkbox"  class="bgff"/></td><td align="center"><input type="button" value="转为新朋友" class="font12 vd_color9 bgff" style="padding:2px; margin-bottom:5px"/>&nbsp;&nbsp;<input type="button" value="删除朋友" class="font12 vd_color9 bgff" style="padding:2px;margin-bottom:5px"/>&nbsp;&nbsp;<span  class="font12 vd_color9">转移组</span><select  class="font12 vd_color9 bgff"><option>老朋友  </option><option>新朋友</option></select></td></tr></table>
			<hr />-->
			<div class="py_head vd_center" style="margin-top:20px">
				<input type="submit" value="保 存" class="bgff mainColor vd_weight" style="padding:5px 50px" />
			</div>
			<#else>
				该分组没有朋友
			</#if>
		</div>
	</div>
</div>
<script>
	function resetValue(obj_id){
		var flag=document.getElementById(obj_id).checked;
		if(flag){
			document.getElementById(obj_id+"_value").value=1;
		}else{
			document.getElementById(obj_id+"_value").value=0;
		}
	}
	
	function confirmDelete(cId){
		if(cId==null||cId==""){
			return;
		}
		if(window.confirm('确认删除该朋友吗')){
			window.location.href="${base}/user/friend/index!delete?id="+cId+"&active=${active!}";
		}
	}
</script>
</@realgodo.cloumn>